/* General setup */

* {
  box-sizing: border-box;
}

html,
body {
  font-family: sans-serif;
  line-height: 1.2rem;
}

/* Layout and styles */

h1 {
  color: green;
  margin-left: 0.5rem;
}

.description,
.derive-bits {
  margin: 0 0.5rem;
}

.description > p {
  margin-top: 0;
}

.derive-bits {
  box-shadow: -1px 2px 5px gray;
  padding: 0.5rem;
  margin-bottom: 2rem;
}

input[type="button"] {
  width: 5rem;
}

.derived-bits-value {
  padding-left: 0.5rem;
  font-family: monospace;
}

/* Whole page grid */
main {
  display: grid;
  grid-template-columns: 40rem 1fr;
  grid-template-rows: 4rem 1fr;
}

h1 {
  grid-column: 1/2;
  grid-row: 1;
}

.examples {
  grid-column: 1;
  grid-row: 2;
}

.description {
  grid-column: 2;
  grid-row: 2;
}

/* derive-bits controls grid */
.derive-bits-controls {
  display: grid;
  grid-template-columns: 1fr 5rem;
  grid-template-rows: 1fr;
}

.derived-bits {
  grid-column-start: 1;
  grid-row-start: 1;
}

.derive-bits-button {
  grid-column-start: 2;
  grid-row-start: 1;
}

/* Animate output display */
.fade-in {
  animation: fadein 0.5s;
}

@keyframes fadein {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
